package com.lotusfall.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;
import java.util.Set;

/**
 * 重写User对象
 */
public class UserSecurity extends User {
    @Getter
    @Setter
    private com.lotusfall.pojo.User loginUser;
    public UserSecurity(com.lotusfall.pojo.User user, Set<GrantedAuthority> authorities) {
        super(user.getUsername(),user.getPassword(),true,true,true,true,authorities);
        this.loginUser = user;
    }

}
